package com.yqy.spring.CGLIB;

import net.sf.cglib.proxy.Enhancer;

public class Client {
    public static void main(String[] args) {
        Enhancer enhancer=new Enhancer();
        enhancer.setSuperclass(UserService.class);
        enhancer.setCallback(new TimerMethodInterceptor());
        UserService userService = (UserService)enhancer.create();
        userService.login();
        userService.logout();

    }
}
